#include <stdio.h>

void exchange(int arr[],int brr[],int n)
{
    int i = 0;
    int temp = 0;
    for (i = 0; i < n; i++)
    {
        temp = arr[i];
        arr[i] = brr[i];
        brr[i] = temp;
    }
}

int main()
{
    int j = 0;
    int arr[5] = {1,2,3,4,5};
    int brr[5] = {6,7,8,9,10};
    int sz = sizeof(arr) / sizeof(arr[0]);
    exchange(arr,brr,sz);
    for (j = 0; j < sz; j++)
    {
        printf("%d ", arr[j]);
    }
    printf("\n");
    for (j = 0; j < sz; j++)
    {
        printf("%d ", brr[j]);
    }
    return 0;
}